package day03;
import java.util.Scanner;
public class Func {

	public static void main(String[] args) {
		/*
		Scanner scan = new Scanner(System.in);
		String a = "显示全部记录";
		String b = "查询登录记录";
		String c = "退出";
		System.out.println("请选择功能:1."+a+" 2."+b+" 0."+c);
		int opt = scan.nextInt();
		switch(opt) {
		case 1:
			System.out.println(a);
			break;
		case 2:
			System.out.println(b);
			break;
		case 0:
			System.out.println(c);
			break;
		default:
			System.out.println("输入有误");
		}
		System.out.println(5+6+""+5+6);
		*/
		//输出用户输入的3个数中最大的值
		int max;
		int middle;
		int small;
		Scanner scan1 = new Scanner(System.in);
		System.out.println("请输入第一个数");
		int a1 = scan1.nextInt();
		System.out.println("请输入第二个数");
		int a2 = scan1.nextInt();
		if(a1 > a2) {
			middle = a1;
			small = a2;
		}else {
			middle = a2;
			small=a1;
		}
		System.out.println("请输入第三个数");
		int a3 = scan1.nextInt();
		if(a3 > middle) {
			max = a3;
			System.out.println("您输入的是:\n"+"a="+a1+",b="+a2+",c="+a3);
			System.out.println("升序排列后,结果为:\n"+"a="+small+",b="+middle+",c="+max);
		}else if(a3 < middle && a3 > small){
			max = middle;
			middle = a3;
			System.out.println("您输入的是:\n"+"a="+a1+",b="+a2+",c="+a3);
			System.out.println("升序排列后,结果为:\n"+"a="+small+",b="+middle+",c="+max);
		}else{
			max = middle;
			middle = small;
			small = a3;
			System.out.println("您输入的是:\n"+"a="+a1+",b="+a2+",c="+a3);
			System.out.println("升序排列后,结果为:\n"+"a="+small+",b="+middle+",c="+max);
		}
		
	}

}
